// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '../static/css/utility.css'

import * as Vui365 from './utils/vui365'
import ApiUrls from './api/index'
import './mock/index'

Vue.config.productionTip = false

// 配置内容
let config = {
  // 登录会话缓存名称
  loginSessName: "admin_token",
  // 开发服务器域名（用于在线图片）
  domain: "http://abc.lh/",
  // 开发服务器接口地址
  apiBaseUrl: "",
  // 默认头像图标
  defaultAvatarIcon: "/static/images/default.png",
  // 是否使用模拟数据（Mock.js）
  useMockData: true,
  // 环境模式(debug=调试环境&dev=开发环境&prod=生产环境)
  envMode: 'prod',
};
if (config.envMode == 'prod') {
  config.domain = '';
  config.apiBaseUrl = 'http://abc.lh/index.php';
  config.useMockData = false;
}

Vue.prototype.apiUrls = ApiUrls
Vue.use(ElementUI)
Vue.use(Vui365, config)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
